/*******************************************************************
 * author   :  Charlies-ls
 * Date     :  2021-09-26
 * Function :  fifo base on list
 * Copyright (c) 2021. artestplay@outlook.com. All Rights Reserved.
 *******************************************************************/

#ifndef AX_FIFO_H
#define AX_FIFO_H
#include "ax_list.h"

#ifdef __cplusplus
extern "C"
{
#endif

typedef struct
{
    ax_list* l;
}ax_fifo;

ax_fifo* ax_fifo_create();
void     ax_fifo_destory(ax_fifo* fifo);

void     ax_fifo_push (ax_fifo* fifo, void* data);
void*    ax_fifo_pop  (ax_fifo* fifo);
void*    ax_fifo_front(ax_fifo* fifo);
void*    ax_fifo_back (ax_fifo* fifo);
int      ax_fifo_size (ax_fifo* fifo);

#ifdef __cplusplus
}
#endif


#endif // AX_FIFO_H
